<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<input type="text" style="ime-mode:disabled;" onpaste="return false;" onkeypress="keyPress()" />
		<input type="text" onKeyUp="this.value=this.value.replace(/[^\.\d]/g,'');if(this.value.split('.').length>2){this.value=this.value.split('.')[0]+'.'+this.value.split('.')[1]}">
		<input type="number" id="n" />
		<script>
			document.getElementById("n").onblur = function() {
				var m = document.getElementById("n").value;
				alert(typeof(m));
				//				if(typeof(m)!='number'){
				//					alert(111);
				//				}
			}

			function keyPress() {
				var keyCode = event.keyCode;
				if((keyCode >= 48 && keyCode <= 57)) {
					event.returnValue = true;
				} else {
					event.returnValue = false;
				}
			}
		</script>
	</body>

</html>